import request from '@/utils/request'
/**
 * 用户相关
 */

// 注册
export function postRegisterApi(data) {
  return request({
    url: '/api/user/register',
    method: 'post',
    data
  })
}
// 登录
export function postLoginApi(data) {
  return request({
    url: '/api/user/login',
    method: 'post',
    data
  })
}
// 退出登录
export function postLogoutApi() {
  return request({
    url: '/api/logout',
    method: 'post',
    data: {}
  })
}

// 用户资产
export function postWalletApi() {
    return request({
    url: '/api/wallet/legalWalletList',
    method: 'post',
    data: {}
  })
}
// 用户信息
export function getUserInfoApi() {
  return request({
    url: '/api/user/info',
    method: 'get'
  })
}
// 资产统计
export function getWalletTotalDataApi() {
    return request({
    url: '/api/walletList2024',
    method: 'get'
  })
}
// 获取充值地址
export function getRechargeAddressApi() {
    return request({
        url: '/api/user/recharge_address_list',
        method: 'get'
    })
}
// 提交充值
export function postRechargeApi(data) {
    return request({
    url: '/api/account/record',
    method: 'post',
    data
  })
}
// 提现
export function postWithdrawApi(data) {
    return request({
    url: '/api/wallet/out',
    method: 'post',
    data
  })
}
// h获取提现手续费
export function getWithdrawFeeApi() {
    return request({
    url: '/api/wallet/fee',
    method: 'get'
  })
}

// 充值记录
export function getRechargeListApi(data) {
    return request({
        url: '/api/account/recordlist',
        method: 'post',
        data
    })
}
// 提款记录
export function getWithdrawListApi(data) {
    return request({
        url: '/api/wallet/withdrawLogList',
        method: 'post',
        data
    })
}
// 提交认证
export function postRealApi(data) {
    return request({
        url: '/api/user/real_name',
        method: 'post',
        data
    })
}
// 获取认证信息
export function getRealApi() {
    return request({
        url: '/api/user/real/state',
        method: 'get'
    })
}
// 发送验证码
export function postSendCodeApi(data) {
    return request({
        url: '/api/sms_mail',
        method: 'post',
        data
    })
}
